package com.shazhu.nongjt.service.impl;

import java.util.List;
import com.shazhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shazhu.nongjt.mapper.NjtQualificationMapper;
import com.shazhu.nongjt.domain.NjtQualification;
import com.shazhu.nongjt.service.INjtQualificationService;

/**
 * 合格证信息Service业务层处理
 * 
 * @author shazhu
 * @date 2025-09-29
 */
@Service
public class NjtQualificationServiceImpl implements INjtQualificationService 
{
    @Autowired
    private NjtQualificationMapper njtQualificationMapper;

    /**
     * 查询合格证信息
     * 
     * @param id 合格证信息主键
     * @return 合格证信息
     */
    @Override
    public NjtQualification selectNjtQualificationById(Long id)
    {
        return njtQualificationMapper.selectNjtQualificationById(id);
    }

    /**
     * 查询合格证信息列表
     * 
     * @param njtQualification 合格证信息
     * @return 合格证信息
     */
    @Override
    public List<NjtQualification> selectNjtQualificationList(NjtQualification njtQualification)
    {
        return njtQualificationMapper.selectNjtQualificationList(njtQualification);
    }

    /**
     * 新增合格证信息
     * 
     * @param njtQualification 合格证信息
     * @return 结果
     */
    @Override
    public int insertNjtQualification(NjtQualification njtQualification)
    {
        njtQualification.setCreateTime(DateUtils.getNowDate());
        return njtQualificationMapper.insertNjtQualification(njtQualification);
    }

    /**
     * 修改合格证信息
     * 
     * @param njtQualification 合格证信息
     * @return 结果
     */
    @Override
    public int updateNjtQualification(NjtQualification njtQualification)
    {
        njtQualification.setUpdateTime(DateUtils.getNowDate());
        return njtQualificationMapper.updateNjtQualification(njtQualification);
    }

    /**
     * 批量删除合格证信息
     * 
     * @param ids 需要删除的合格证信息主键
     * @return 结果
     */
    @Override
    public int deleteNjtQualificationByIds(Long[] ids)
    {
        return njtQualificationMapper.deleteNjtQualificationByIds(ids);
    }

    /**
     * 删除合格证信息信息
     * 
     * @param id 合格证信息主键
     * @return 结果
     */
    @Override
    public int deleteNjtQualificationById(Long id)
    {
        return njtQualificationMapper.deleteNjtQualificationById(id);
    }
}
